package com.atguigu.yygh.msm.service.impl;

import com.atguigu.yygh.msm.service.MsmService;
import com.atguigu.yygh.msm.utils.EmailUtil;
import com.atguigu.yygh.msm.utils.RandomUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shkstart
 * @create 2023-04-05 20:04
 */
@Service
public class MsmServiceImpl implements MsmService {

    @Autowired
    private EmailUtil emailUtil;

    @Override
    public boolean sendEmailCode(String email, String emailCode) {
        String title = "邮箱注册验证";
        String content = "您正在注册账号，请在验证码输入框中输入：  " + emailCode + "    以完成操作。五分钟内有效！";
//        String email = "2797886868@qq.com";
        emailUtil.sendMessage(email, title, content);
        return true;
    }
}
